package cn.bisoft.java.bean.message;

import java.io.Serializable;
import cn.bisoft.java.util.common.ObjectUtil;

public class TransMessage implements Serializable, Cloneable
{
	private static final long serialVersionUID = 1254606653073562705L;

	private MessageBody body;

	private MessageHeader header;

	private String id;

	private String version;

	public MessageBody getBody()
	{
		return this.body;
	}

	public MessageHeader getHeader()
	{
		return this.header;
	}

	public String getId()
	{
		return this.id;
	}

	public String getVersion()
	{
		return this.version;
	}

	public void setBody(MessageBody body)
	{
		this.body = body;
	}

	public void setHeader(MessageHeader header)
	{
		this.header = header;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public void setVersion(String version)
	{
		this.version = version;
	}

	public boolean equals(Object obj)
	{
		return this.id.equalsIgnoreCase(((TransMessage) obj).getId());
	}

	public Object clone() throws CloneNotSupportedException
	{
		return ObjectUtil.byteClone(this);
	}
}
